package cn.lx.application;


import cn.lx.feature.AOPConstants;
import cn.lx.feature.AOPFeature;
import cn.lx.feature.LxAOP;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.ServerProperties;

import javax.ws.rs.ApplicationPath;

/**
 * Created by lxliuxuan on 2016/11/11.
 */
@ApplicationPath("/")
public class Application extends ResourceConfig{
    public Application() {
        /*声明资源包所在位置
        * */
        packages("cn.lx.resource");

        /**
         * 声明过滤器所在位置
         */
        packages("cn.lx.filter");
        register(AOPFeature.class);
/*        property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
        property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);*/
        property(AOPConstants.INTECEPTOR_PACKAGE,"cn.lx.interceptor");
    }
}
